package utils;

import redis.clients.jedis.Jedis;

public class RedisInstance {
    private static volatile Jedis jedis=null;

    private RedisInstance(){

    }

    public static Jedis getInstance(){
        if (jedis==null){
            synchronized (RedisInstance.class) {
                if (jedis==null){
                    jedis = new Jedis("122.112.182.244", 6379);
                    jedis.auth("123456");
                    return jedis;
                }
            }
        }
        return jedis;
    }
}
